<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<div th:replace="blog/yummy-jekyll/header::header('博客列表','My Blog')"></div>
<body>
<div class="content">
    <section class="jumbotron geopattern">
        <div class="container">
            <div id="jumbotron-meta-info">
                <h1>文章列表</h1>
                <br>
                <span class="meta-info">
                        <span class="mega-octicon octicon-list-unordered">
                            &nbsp;&nbsp;<th:block th:text="|${pageName}页|"></th:block>
                        </span>
                </span>
            </div>
        </div>
    </section>
    <article class="post container">
        <div class="row">
            <div class="col-md-10">
                <!-- Blog list -->
                <ul id="posts-list">
                    <th:block th:if="${null != blogPageResult}">
                        <th:block th:each="blog,iterStat : ${blogPageResult.list}">
                            <li class="posts-list-item">
                                <div class="posts-content">
                                    <span class="posts-list-meta"
                                          th:text="${#dates.format(blog.createTime, 'yyyy-MM-dd')}">2019-01-01</span>
                                    <a class="posts-list-name bubble-float-left" th:href="@{'/blog/' + ${blog.blogId}}">
                                        <th:block th:text="${blog.blogTitle}"></th:block>
                                    </a>
                                    <span class="circle"></span>
                                </div>
                            </li>
                        </th:block>
                    </th:block>
                </ul>
                <!-- Pagination -->
                <th:block th:if="${null != blogPageResult}">
                    <ul class="pagination text-align">
                        <li th:class="${blogPageResult.currPage==1}?'disabled' : ''"><a
                                th:href="@{${blogPageResult.currPage==1}?'##':'/'+${pageUrl}+'/'+${keyword}+'/' + ${blogPageResult.currPage-1}}">&laquo;</a>
                        </li>
                        <li th:if="${blogPageResult.currPage-3 >=1}"><a
                                th:href="@{'/'+${pageUrl}+'/'+${keyword}+'/' + ${blogPageResult.currPage-3}}"
                                th:text="${blogPageResult.currPage -3}">1</a></li>
                        <li th:if="${blogPageResult.currPage-2 >=1}"><a
                                th:href="@{'/'+${pageUrl}+'/'+${keyword}+'/' + ${blogPageResult.currPage-2}}"
                                th:text="${blogPageResult.currPage -2}">1</a></li>
                        <li th:if="${blogPageResult.currPage-1 >=1}"><a
                                th:href="@{'/'+${pageUrl}+'/'+${keyword}+'/' + ${blogPageResult.currPage-1}}"
                                th:text="${blogPageResult.currPage -1}">1</a></li>
                        <li class="active"><a href="#" th:text="${blogPageResult.currPage}">1</a></li>
                        <li th:if="${blogPageResult.currPage+1 <=blogPageResult.totalPage}"><a
                                th:href="@{'/'+${pageUrl}+'/'+${keyword}+'/' + ${blogPageResult.currPage+1}}"
                                th:text="${blogPageResult.currPage +1}">1</a></li>
                        <li th:if="${blogPageResult.currPage+2 <=blogPageResult.totalPage}"><a
                                th:href="@{'/'+${pageUrl}+'/'+${keyword}+'/' + ${blogPageResult.currPage+2}}"
                                th:text="${blogPageResult.currPage +2}">1</a></li>
                        <li th:if="${blogPageResult.currPage+3 <=blogPageResult.totalPage}"><a
                                th:href="@{'/'+${pageUrl}+'/'+${keyword}+'/' + ${blogPageResult.currPage+3}}"
                                th:text="${blogPageResult.currPage +3}">1</a></li>
                        <li th:class="${blogPageResult.currPage==blogPageResult.totalPage}?'disabled' : ''"><a
                                th:href="@{${blogPageResult.currPage==blogPageResult.totalPage}?'##' : '/'+${pageUrl}+'/'+${keyword}+'/' + ${blogPageResult.currPage+1}}">&raquo;</a>
                        </li>
                    </ul>
                </th:block>
            </div>
        </div>
    </article>
</div>
</body>
<div th:replace="blog/yummy-jekyll/footer::footer"></div>
</html>